Source routing is a protocol that partially or completely specifies a route that a packet may travel via a network within a source route header. The source route header may contain a strict list or a loose list of links and/or nodes to traverse. The strict list may explicitly list all of the links and/or nodes a packet may be transported over. Alternatively, the loose list may specify one or more links and/or nodes that the packet may need to traverse through to reach a destination. A loose list may not include all the links and/or nodes that a packet may traverse through to reach the destination. As such, additional routing decisions may be used to route the packet through one intermediate point and to another intermediate point. Implementing source routing may simplify data forwarding network nodes and reduce routing time and latency when compared to using a forwarding table. Instead of performing lookup functions using the forwarding table, a network node (e.g. router) uses the routing information within the source route header to forward the data packet.
Load balancing may be used to route packets across multiple paths. For instance, load balancing may ease capacity planning and absorb traffic surges by spreading traffic surges across multiple paths. Load balancing may also offer alternate paths and provide better resilience against link and/or node failures. An important constraint when performing load balancing is to map packets that belong to a given flow over the same path (e.g. the same exact sequence of links across the network). Mapping packets within the same flow over the same path avoids jitter, latency, and reordering issues. One method used to map the packets from the same flow to the same path is to input keys obtained from a packet's header into a load balancing function (e.g. a hashing function). The load balancing function subsequently attempts to assign all packets corresponding to a particular flow to the same path. Thus, the load balancing function attempts to evenly distribute packets amongst the multiple paths by assigning different flows to different paths.
In some instances, a network node may receive a source routing packet comprising a link identifier that corresponds to a plurality of physical links between the network node and the next hop network node. To prevent packet re-ordering, the network node may not randomly choose one of the physical links (e.g. using a round robin algorithm) identified within the source route header and subsequently transmit the packet over one of the randomly chosen physical links. Typically, the network node may use a load balancing function to route the source routing packet to one of the physical links using information from the payload. Unfortunately, performing the load balancing function may be relatively complex and thereby increases processing time at the network node. For instance, the payload may vary in distance from the list of links for a variable-sized source route header. Moreover, the network node may need to determine the exact format of the payload to implement the load balancing function.